package com.ruoyi.finances.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.finances.mapper.TbCredentialsMapper;
import com.ruoyi.finances.domain.TbCredentials;
import com.ruoyi.finances.service.ITbCredentialsService;

/**
 * 凭证Service业务层处理
 * 
 * @author 阿飞
 * @date 2024-11-13
 */
@Service
public class TbCredentialsServiceImpl implements ITbCredentialsService 
{
    @Autowired
    private TbCredentialsMapper tbCredentialsMapper;

    /**
     * 查询凭证
     * 
     * @param id 凭证主键
     * @return 凭证
     */
    @Override
    public TbCredentials selectTbCredentialsById(Long id)
    {
        return tbCredentialsMapper.selectTbCredentialsById(id);
    }

    /**
     * 查询凭证列表
     * 
     * @param tbCredentials 凭证
     * @return 凭证
     */
    @Override
    public List<TbCredentials> selectTbCredentialsList(TbCredentials tbCredentials)
    {
        return tbCredentialsMapper.selectTbCredentialsList(tbCredentials);
    }

    /**
     * 新增凭证
     * 
     * @param tbCredentials 凭证
     * @return 结果
     */
    @Override
    public int insertTbCredentials(TbCredentials tbCredentials)
    {
        return tbCredentialsMapper.insertTbCredentials(tbCredentials);
    }

    /**
     * 修改凭证
     * 
     * @param tbCredentials 凭证
     * @return 结果
     */
    @Override
    public int updateTbCredentials(TbCredentials tbCredentials)
    {
        return tbCredentialsMapper.updateTbCredentials(tbCredentials);
    }

    /**
     * 批量删除凭证
     * 
     * @param ids 需要删除的凭证主键
     * @return 结果
     */
    @Override
    public int deleteTbCredentialsByIds(Long[] ids)
    {
        return tbCredentialsMapper.deleteTbCredentialsByIds(ids);
    }

    /**
     * 删除凭证信息
     * 
     * @param id 凭证主键
     * @return 结果
     */
    @Override
    public int deleteTbCredentialsById(Long id)
    {
        return tbCredentialsMapper.deleteTbCredentialsById(id);
    }
}
